import React, { Component } from 'react';
import '../Public/iconfont.css'
import '../Public/reset.css'

import '../City/getcity_search.scss'
import { connect } from "react-redux";
import { cityGo } from './getCity'

class getcity_search extends Component {
    componentDidMount() {
        //  cityGo()
    }
    gobackCity=()=>{
        this.props.history.go(-1)
    }
    render() {
        console.log(this.props);
        return (
            <div className="city-container">
                <div className="head">
                    <div className="head-goback" onClick={this.gobackCity}>
                        <i className="iconfont icon-zuojiantou"></i>
                    </div>
                    <div className="head-title">
                        <p>{this.props.idcity && this.props.idcity.name}</p>
                    </div>
                    <div className="head-change">
                        <a href="#">切换城市</a>
                    </div>
                </div>

                <div className="search-adress">
                    <div className="search-input">
                        <input type="search" placeholder="输入学校、商务楼、地址" />
                    </div>
                    <div className="search-submit">
                        <button name="submit" >提交</button>
                    </div>
                </div>

                <div className="search-history">
                    <p className="history-title">搜索历史</p>
                    <div className="search-history-contain">
                        <ul className="history-list">
                            <li className="history-list-item">123</li>
                        </ul>
                    </div>
                </div>

            </div>
        );
    }
}

export default connect((state) => {
    return {
        idcity: state.homeReducer.idcity
    }
}, null)(getcity_search);
